package com.example.aliyun.plus;

public class ThreadSleep {
    public static void main(String[] args) {
        for (int num = 0; num < 5; num++) {
            new Thread(()->{
                try {
                    for (int i = 0; i < 10; i++) {
                        System.out.println(Thread.currentThread().getName() + ", i=" + i);
                        Thread.sleep(1000);
                    }
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }, "线程-------" +num ).start();
        }
    }
}
